package com.attendance.chdingtask.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;


@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Data
@Table(name="user_info")
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"})
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@ApiModel(description = "员工表")
@EntityListeners(AuditingEntityListener.class)
public class UserInfo implements Serializable {
    private static final long serialVersionUID = 7770152745455855970L;

    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    @ApiModelProperty(value = "主键")
    private Long id;

    @ApiModelProperty(value = "用户主键")
    private String userid;
    @ApiModelProperty(value = "员工在当前开发者企业账号范围内的唯一标识")
    private String unionid;

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "头像")
    private String avatar;


    @ApiModelProperty(value = "手机号")
    private String mobile;

    @ApiModelProperty(value = "部门id")
    private String department;

    @ApiModelProperty(value = "部门名称")
    private String departmentName;

    @ApiModelProperty(value = "岗位")
    private String position;

    @ApiModelProperty(value = "工号")
    private String jobnumber;


    @ApiModelProperty(value = "入职日期")
    private Date hiredDate;


    @ApiModelProperty(value = "公司id")
    private  String corpId;

    @ApiModelProperty(value = "删除标记")
    private int  dr ;

    @CreatedDate
    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @LastModifiedDate
    @Column(name = "modify_time")
    @ApiModelProperty(value = "修改时间")
    private Date modifyTime;


    @ApiModelProperty(value = "排序")
    private Long orderNo;

}
